package com.qyx.pmpucat.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.RelationOneToMany;
import com.mybatisflex.annotation.Table;
import com.qyx.pmpucat.entity.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 用户答题记录实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("t_user_answer")
public class UserAnswer extends BaseEntity {

    /**
     * 用户ID
     */
    @Column("user_id")
    private Long userId;

    /**
     * 问卷ID
     */
    @Column("questionnaire_id")
    private Long questionnaireId;

    /**
     * 答题状态: 0-未完成, 1-已完成
     */
    @Column("status")
    private Integer status;

    /**
     * RE能力参数评估值
     */
    @Column("re_num")
    private Double reNum;

    /**
     * SE标准误差值
     */
    @Column("se_num")
    private Double seNum;

    @Column("user_answer_group_id")
    private Long userAnswerGroupId;

    /**
     * 答题详情列表
     */
    @Column(ignore = true)
    @RelationOneToMany(targetField = "userAnswerId")
    private List<UserAnswerDetail> answerDetails;

    @Column(ignore = true)
    private Long questionId;

    @Column(ignore = true)
    private String questionnaireTitle;

} 